package com.example.dubbo.consumer.controller;

import com.example.dubbo.consumer.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * @author xyh
 * @date 2021/7/5 15:49
 */
@RequestMapping("/common")
@RestController
public class OrderController {


    @Autowired
    private ConsumerService consumerService;


    @GetMapping("/getOrder/{id}")
    private Object getOrder(@PathVariable("id") Long id){

        return consumerService.getOrder(id);
    }

    @GetMapping("/getName/{id}")
    private Object getUserName(@PathVariable("id") Long id){

        return consumerService.getUserName(id);
    }


}
